package com.qf.tenant.manager.api;

import com.qf.common.bean.R;
import com.qf.common.dto.DeviceDto;
import com.qf.tenant.manager.service.DeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 设备管理
 * @author 千锋健哥
 */
@RestController
@RequestMapping("/tenant/device")
public class DeviceController {

    @Autowired
    private DeviceService deviceService;

    /**
     * 设备添加
     * @param dto
     * @return
     */
    @PostMapping("/add")
    public R addDevice(@RequestBody DeviceDto dto) {
        R result = deviceService.addDevice(dto);
        return result;
    }
}
